<?php if (!defined('THINK_PATH')) exit();?><div class="row">
          <div class="col-lg-12">
            <div class="card">
              <div class="card-toolbar clearfix">
                <form class="pull-right search-bar" method="get" action="#!" role="form">
                  <div class="input-group">
                    <div class="input-group-btn">
                      <input type="hidden" name="search_field" id="search-field" value="title">
                      <button class="btn btn-default dropdown-toggle" id="search-btn" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
                      标题 <span class="caret"></span>
                      </button>
                      <ul class="dropdown-menu">
                        <li> <a tabindex="-1" href="javascript:void(0)" data-field="title">标题</a> </li>
                        <li> <a tabindex="-1" href="javascript:void(0)" data-field="cat_name">栏目</a> </li>
                      </ul>
                    </div>
                    <input type="text" class="form-control" value="" name="keyword" placeholder="请输入名称">
                  </div>
                </form>
                <div class="toolbar-btn-action">
                  <a class="btn btn-primary m-r-5 class_add" href="javascript:void(0)" data-toggle="modal" data-target="#exampleModal" data="" class="class_add"><i class="mdi mdi-plus"></i> 新增分类</a>

                </div>
              </div>
              <div class="card-body">
                
                <div class="table-responsive">
                  <table class="table table-bordered">
                    <thead>
                      <tr>
                        <th class="col-lg-1">编号</th>
                        <th>分类名称</th>
                        <th>子类</th>
                        <th>操作</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr>
                        <td>1</td>
                        <td>分类名称</td>
                        <td><a href="javascript:void(0)" data-toggle="modal" data-target="#exampleModal" data="8" class="class_add">添加子分类</a></td>
                        <td>
                          <div class="btn-group">
                            <a class="btn btn-xs btn-default" href="#!" title="" data-toggle="tooltip" data-original-title="编辑"><i class="mdi mdi-pencil"></i></a>
                            <a class="btn btn-xs btn-default" href="#!" title="" data-toggle="tooltip" data-original-title="删除"><i class="mdi mdi-window-close"></i></a>
                          </div>
                        </td>
                      </tr>
                      <tr>
                        <td>1</td>
                        <td>分类名称</td>
                        <td><a href="javascript:void(0)" data-toggle="modal" data-target="#exampleModal" data="9" class="class_add">添加子分类</a></td>
                        <td>
                          <div class="btn-group">
                            <a class="btn btn-xs btn-default" href="#!" title="" data-toggle="tooltip" data-original-title="编辑"><i class="mdi mdi-pencil"></i></a>
                            <a class="btn btn-xs btn-default" href="#!" title="" data-toggle="tooltip" data-original-title="删除"><i class="mdi mdi-window-close"></i></a>
                          </div>
                        </td>
                      </tr>

                    </tbody>
                  </table>
                </div>
                <ul class="pagination">

                </ul>
       
              </div>
            </div>
          </div>   
</div>
<!--模拟静态框-->
  <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" style="display: none;">
                  <div class="modal-dialog" role="document">
                    <div class="modal-content">
                      <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                        <h4 class="modal-title" id="exampleModalLabel">新增分类</h4>
                      </div>
                      <div class="modal-body">
                        <form>
                          <div class="form-group">
                            <label for="recipient-name" class="control-label">分类名称：</label>
                            <input type="text" class="form-control" id="recipient-name">
                          </div>
                         <div class="form-group">
                            <label for="recipient-name" class="control-label">分类排序：</label>
                            <input type="text" class="form-control" id="recipient-name">
                          </div>
                          <div class="form-group">
                            <label for="recipient-name" class="control-label">所属分类：</label>
                            <input type="text" class="form-control" id="sid">
                          </div>
                        </form>
                      </div>
                      <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary">发送消息</button>
                      </div>
                    </div>
                  </div>
                </div>
<!--模拟静态框-->
<script>
//添加分类
  $('.class_add').click(function(){
  	$('#sid').val($(this).attr("data"));
  }); 
</script>